import request from '@/utils/request'

// 查询测试计划列表
export function listTestPlan(projectId, query) {
  return request({
    url: '/user/project/testPlan/list/'+projectId,
    method: 'get',
    params: query
  })
}
// 查询测试计划列表
export function listAllTestPlan(projectId,query) {
  return request({
    url: '/user/project/testPlan/listAll/'+projectId,
    method: 'get',
    params: query
  })
}

// 查询测试计划详细
export function getTestPlan(planId) {
  return request({
    url: '/user/project/testPlan/' + planId,
    method: 'get'
  })
}

// 新增测试计划
export function addTestPlan(projectId,data) {
  return request({
    url: '/user/project/testPlan/'+projectId,
    method: 'post',
    data: data
  })
}

// 修改测试计划
export function updateTestPlan(projectId,data) {
  return request({
    url: '/user/project/testPlan/'+projectId,
    method: 'put',
    data: data
  })
}

// 删除测试计划
export function delTestPlan(planId) {
  return request({
    url: '/user/project/testPlan/' + planId,
    method: 'delete'
  })
}
// 获取测试计划全部的详细信息
export function allInit(testPlanList) {
  return request({
    url: '/user/project/testPlan/allInit/' + testPlanList,
    method: 'get'
  })
}
